package interceptors;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

//可以实现Interceptor
public class MyInterceptor extends AbstractInterceptor {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		
		System.out.println("before invocation.invoke...");
		
		//可以不调用
		String result = invocation.invoke();
		
		System.out.println("after invocation.invoke...");
		
		return "success";
	}
}
